<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>OMMS 守夜者</title>
    {% block css %}

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <link href="/static/css/plugins/font-awesome/css/font-awesome.css" rel="stylesheet">
        <!-- Morris -->
        <link href="/static/css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
        <link href="/static/css/animate.css" rel="stylesheet">
        <link href="/static/css/style.css" rel="stylesheet">

        <link href="/static/css/plugins/select2/select2.min.css" rel="stylesheet">
        <link href="/static/css/plugins/codemirror/codemirror.css" rel="stylesheet">

        <link href="/static/css/plugins/fileinput/fileinput.min.css" rel="stylesheet">

        <link rel="stylesheet" type="text/css" href="/static/css/plugins/chosen/chosen.css">
        <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
        <link rel="shortcut icon" href="/static/img/p.ico" type="image/x-icon" />

    {% endblock %}

</head>

<body class="{% block body_class %}fixed-navigation {% endblock body_class %}">
<div id="wrapper">
    {% include "base/sidebar.html" %}
    <div id="page-wrapper" class="gray-bg sidebar-content">
        {% include "base/top_nav.html" %}
        <div class="row wrapper border-bottom white-bg page-heading">

            <div class="col-lg-10">
                <h2></h2>
                <ol class="breadcrumb">
                    {% for breadcrumb in request.breadcrumbs %}

                        {% if not forloop.last %}
                            <a style="color:#676A6C;" href="{{ breadcrumb.url }}">{{ breadcrumb.name }}</a>
                            /
                        {% else %}
                            <a style="color:#676A6C;" href="{{ breadcrumb.url }}"><b>{{ breadcrumb.name }}</b></a>
                        {% endif %}
                    {% endfor %}
                </ol>
            </div>

        </div>
        {% block content %}
        {% endblock content %}
        {% include "base/footer.html" %}
    </div>
</div>

{% block javascripts %}

    <!-- Mainly scripts -->
    <script src="/static/js/jquery-2.1.1.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
    <script src="/static/js/bootstrap-notify.min.js"></script>
    <script src="/static/js/ops.js"></script>
    <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Flot -->
    <script src="/static/js/plugins/flot/jquery.flot.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.spline.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.pie.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.symbol.js"></script>
    <script src="/static/js/plugins/flot/curvedLines.js"></script>

    <!-- Peity -->
    <script src="/static/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="/static/js/demo/peity-demo.js"></script>

    <script src="/static/js/plugins/fileinput/fileinput.min.js"></script>
    <script src="/static/js/plugins/fileinput/locales/zh.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="/static/js/inspinia.js"></script>
    <script src="/static/js/plugins/pace/pace.min.js"></script>

    <!-- jQuery UI -->
    <script src="/static/js/plugins/jquery-ui/jquery-ui.min.js"></script>

    <!-- Jvectormap -->
    <script src="/static/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="/static/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>

    <!-- Sparkline -->
    <script src="/static/js/plugins/sparkline/jquery.sparkline.min.js"></script>

    <!-- Sparkline demo data  -->
    <script src="/static/js/demo/sparkline-demo.js"></script>

    {# 加载layer控件，实现弹出框 #}
    <script src="/static/js/plugins/layer/layer.js"></script>

    <!-- ChartJS-->
    <script src="/static/js/plugins/chartJs/Chart.min.js"></script>

{#    <script src="/static/js/plugins/codemirror/codemirror.js"></script>#}
    <script src="/static/js/plugins/select2/select2.full.min.js"></script>
{#    <script src="/static/js/plugins/codemirror/mode/shell/shell.js"></script>#}
{#    <script src="/static/js/plugins/codemirror/mode/python/python.js"></script>#}
{#    <script src="/static/js/plugins/codemirror/mode/yaml/yaml.js"></script>#}

    <script src="/static/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>

    <script src="/static/js/echarts.js"></script>

    <script type="text/javascript">
        var pnum = [30, 50, 100];
        var optionArr = new Array();
        $.each(pnum, function (i) {
            if (pnum[i] == "{{ pagenumber }}") {
                optionArr.push('<option value="' + pnum[i] + '" selected="selected">' + pnum[i] + '</option>');
            }
            else {
                optionArr.push('<option value="' + pnum[i] + '">' + pnum[i] + '</option>');
            }
        });
        $('#pagenumber').append(optionArr.join(''));

        $('#pagenumber').change(function () {
            var pagenumber = $('#pagenumber').val();
            var page = {{content.number}};
            window.location.href = '?page=' + page + '&' + 'pagenumber=' + pagenumber;
        });

    </script>

    <script type="text/javascript">
        $('#side-menu li a').each(function () {
            var link = $(this).attr("href");
            if (link == window.location.pathname) {
                $(this).parent().addClass('active');
                $(this).parent().parent().parent().addClass('active');
            }
        })

    </script>

{#    <script>#}
{#        $(document).ready(function () {#}
{#            $('.select2').select2();#}
{#            var editor_two = CodeMirror.fromTextArea(document.getElementById("id_tool_script"), {#}
{#                lineNumbers: true,#}
{#                matchBrackets: true,#}
{#                styleActiveLine: true,#}
{#                lineWrapping: true,#}
{#                foldGutter: true,#}
{#                gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],#}
{##}
{##}
{#            });#}
{#        });#}
{#    </script>#}


    {# 全选 #}
    <script>
        $("#CheckedAll").click(function () {
            if ($(this).is(":checked")) {
                $("[name=id]:checkbox").prop("checked", true);
            } else {
                $("[name=id]:checkbox").prop("checked", false);
            }
        });
    </script>

{% endblock %}

</body>

</html>